﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace DAMS.Models
{
    /// <summary>
    /// 文章实体
    /// </summary>
    public class Article:BaseModel
    {
        /// <summary>
        /// 文章ID
        /// </summary>
        
        public int ID { get; set; }

        /// <summary>
        /// 文章标题
        /// </summary>
        [Required]
        [Display(Name = "标题")]
        public string Title { get; set; }

        /// <summary>
        /// 作者
        /// </summary>
        [Display(Name ="作者")]
        public string Auth { get; set; }

        /// <summary>
        /// 发布时间
        /// </summary>
        [Required]
        [Display(Name = "发布时间")]
        public DateTime PublishTime { get; set; }

        /// <summary>
        /// 是否置顶
        /// </summary>
        [Display(Name = "置顶")]
        public bool isTop { get; set; }

        /// <summary>
        /// 是否发布
        /// </summary>
        [Display(Name = "发布状态")]
        public bool isPublish { get; set; }

        /// <summary>
        /// 是否轮播
        /// </summary>
        [Display(Name = "轮播")]
        public bool isCarousel { get; set; }

        /// <summary>
        /// 轮播图片地址
        /// </summary>
        [Display(Name = "轮播图")]
        public string CarouselPath { get; set; }

        /// <summary>
        /// 封面图片地址
        /// </summary>
        [Display(Name = "封面图")]
        public string CoverPath { get; set; }

        /// <summary>
        /// 文章内容
        /// </summary>
        [Display(Name = "内容")]
        public string Content { get; set; }

        /// <summary>
        /// 文章摘要
        /// </summary>
        [Display(Name = "摘要")]
        public string Excerpt { get; set; }

        [Required]
        /// <summary>
        /// 分类ID:必须
        /// </summary>
        [Display(Name = "分类")]
        public int CategoryID { get; set; }

        /// <summary>
        /// 点击次数
        /// </summary>
        [Display(Name = "点击量")]
        public int ClickNum { get; set; }
        /// <summary>
        /// 标签
        /// </summary>
        [Display(Name = "标签")]
        public List<ArticleTag> ArticleTags { get; set; }


    }
}
